package com.why.remote;

import com.github.pagehelper.PageInfo;
import com.why.dto.NhDto;
import com.why.pojo.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface RepairRemote {
    @RequestMapping("/building")
        //查询所有楼栋
    NhDto<List<Building>> building();

    //按楼栋查楼层
    @RequestMapping("/floor")
    NhDto<List<Floor>> floorById(@RequestParam("id") int id);

    //按楼层查房间
    @RequestMapping("/room")
    NhDto<List<Room>> roomById(@RequestParam("id") int id);
    //修理详情提交
    @RequestMapping("/maintain")
    NhDto<Boolean> insertMaintain(@RequestBody Maintain maintain);
    //申请修理列表
    @RequestMapping("/maintainAll")
    NhDto<PageInfo<Maintain>> maintainAll(@RequestParam("pageNum") int pageNum, @RequestParam("pageSize") int pageSize);
    //修改申请状态
    @RequestMapping("/updataStatus")
    NhDto<Boolean> updataStatus(@RequestBody Maintain maintain);
    //申请详情
    @RequestMapping("/maintainById")
    NhDto<Maintain> maintainById(@RequestParam("id") Integer id);

    //电工反馈
    @RequestMapping("/maintenanceAdd")
    NhDto<Boolean> maintenanceAdd(@RequestBody Maintenance maintenance);

}
